﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Collections.Specialized;
using SharpDB.SqlServer;

namespace SharpSqlServer.UnitTestProject
{
    [TestClass]
    public class UnitTest1
    {

        static string connString = "server=TAKETRY;database=SharpSln;uid=sa;pwd=123456;Connect Timeout=30;Pooling=true;Max Pool Size=150;MultipleActiveResultSets=true;";
        static SqlServerDB db = new SqlServerDB(connString);

        [TestMethod]
        public void TestMethod1()
        {
            NameValueCollection nvc = new NameValueCollection();
            nvc.Add("Id", "2");
            nvc.Add("Name1", "ABS");

            bool bl = db.Upsert(nvc, "t1");
             
            db.OnError += Db_OnError;
        }

        private void Db_OnError(object sender, SharpDB.OnErrorEventArgs e)
        {
            
        }
    }
}
